<template>
    <div class="execution">
    <div class="bg-container">
        <div class="title">
          <h2>基本信息</h2>
          <el-row>
            <el-col :span="4">
              商品名称: <span>{{detail.goodsName}}</span>
            </el-col>
            <el-col :span="4">
              汇总单号: <span>{{detail.detailList[0].summaryOrderId}}</span>
            </el-col>
          </el-row>
        </div>
        <div class="content">
          <avue-crud :option="option" :data="tableData" @search-change="searchChange">

          </avue-crud>
        </div>
      </div>
    </div>
</template>

<script>
  import {summaryOrderDetail} from "../../../../api/scm/order/summary_order";
  import Util from '@/util/pds/utils'
    import dictionary from '@/util/pds/dictionary'
  let cookieUtil = new Util();
    export default {
        name: "index",
        data() {
            return {
                pmId: this.getStore({name: "pmId"}),
                searchForm: {},
                tableData: [],
                option: {
                    menu: false,
                    addBtn: false,
                    delBtn:false,
                    editBtn: false,
                    delBtn: true,
                    selectClearBtn:true,
                    column: [
                      {
                        label: '出库单明细编号',
                        prop: 'exitWarehouseDetailSn',
                      },

                      {
                        label: '出库状态',
                        prop: 'exitStatus',
                        formatter:function(value,row,column){
                          return dictionary.buyerOption[""+value.exitStatus];
                        }
                      },
                      {
                        label: '出库货品数量',
                        prop: 'productNumber',

                      },
                      {
                        label: '货品单位',
                        prop: 'unit',

                      },
                      {
                        label: '送货批次',
                        prop: 'deliverySeq',
                        formatter:function(value,row,column){
                          return dictionary.buySeqOptions[""+value.deliverySeq].label;
                        }
                      },
                      {
                        label: '创建时间',
                        prop: 'createDate',
                      },                    
                      ]
                },
                detail:{}
            }
        },
        created(){
          this.init();
        },
        methods:{
          searchChange(params) {
            this.$message.success('search callback' + JSON.stringify(Object.assign(params, this.searchForm)))
          },
          init(){
            this.detail = this.$route.query.row;
            this.tableData = Object.assign([],this.detail.detailList);
            console.log(this.detail,"2222222")
          }
        }
    }
</script>

<style lang="scss">
  .execution {
      width: 100%;
      height: 100%;
      padding: 0 10px;
    .bg-container {
      height: 100%;
      background-color: #fff;
      .title {
          border-radius: 4px 4px 0 0;
          h2 {
              height: 55px;
              line-height: 55px;
              border-radius: 4px 4px 0 0;
              background-color: #e0e0e0;
              font-size: 21px;
              color: #333;
              padding-left: 20px;
          }
          .el-row {
              padding: 20px;
              line-height: 14px;
              font-size: 14px;
              span {
                  margin-left: 10px;
              }
          }
       }
      .content {
          width: 100%;
          padding: 0 20px 20px;
          border-radius: 0 0 4px 4px;
          .avue-crud {
              margin-left: 0;
              .el-card__body {
                  padding: 0;
                  .avue-crud__header{
                    margin-bottom: 10px;
                    .el-form--inline{
                      height: 40px;
                      line-height: 40px;
                    }
                  }
                  .avue-crud__menu{
                      margin-bottom: 10px;
                  }
              }
          }
      }
    }
  }
</style>
